import { createRouter, createWebHistory } from "vue-router";
import Home from "../pages/home/index.vue";
import Tea from  "../pages/tea/index.vue";

export default createRouter({
  history: createWebHistory(),
  routes: [
    { path: "/", component: Home, alias: "/home" },
    { path: "/tea/:id", name: "tea", props: route => ({id: parseInt(route.params.id as string)}), component: Tea },
    { path: "/about", name: "about", component: Home }
  ]
});